package com.gupaowork.pattern.strategy;


/**
 * @Author heweicheng
 * 客户端调用
 */
public class Client {

    public static void main(String[] args) {
        //根据客户购买的金额，计算最终应付的金额
        Customer customer = new Customer();
        customer.buy(500D);
        System.out.println("客户需要付钱：" + customer.calLastAmount());
        customer.buy(1200D);
        System.out.println("客户需要付钱：" + customer.calLastAmount());
        customer.buy(1200D);
        System.out.println("客户需要付钱：" + customer.calLastAmount());
        customer.buy(1300D);
        System.out.println("客户需要付钱：" + customer.calLastAmount());
    }

}
